using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;using THSERP.BusinessEntities;using THSERP.BaseProvider;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using THSLib;using THSERP.BaseProvider;

namespace THSERP.Modules.CompanyConstant
{
    public partial class guiConfigProductType : THSERPScreen
    {
        DataTable tblConfigProductType;
        public guiConfigProductType()
        {
            InitializeComponent();
        }

        private void guiConfigProductType_Load(object sender, EventArgs e)
        {
            tblConfigProductType = ADConfigValueUtility.glbdsConfigValues.Tables[ADConfigValueUtility.ADConfigValueProductType];
            fld_dgcProductType.DataSource = tblConfigProductType;
        }
#if never
        public void SaveConfigProductType()
        {
            foreach (DataRow rowProductType in tblConfigProductType.Rows)
            {
                String strProductTypeValue = rowProductType["Text"].ToString();
                String strADConfigValueColumnName = ADConfigValueUtility.ADConfigValueColumnPrefix + ADConfigValueUtility.ADConfigValueProductType + rowProductType["Value"].ToString();
                if (!String.IsNullOrEmpty(strProductTypeValue))
                    ADConfigValueUtility.ChangeTableADConfigValue(strADConfigValueColumnName, strProductTypeValue);
            }
        }
#endif
        private void fld_btnSave_Click(object sender, EventArgs e)
        {
            //SaveConfigProductType();
            MessageBox.Show("Gespeichert", "#Message#");
        }


        private void fld_btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

    }
}